<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight_cubescript.cfg</title>
<meta name="generator" content="KF5::SyntaxHighlighting (CubeScript)"/>
</head><body style="color:#1f1c1b"><pre>
<span style="color:#898887;">// kate: syntax CubeScript;</span>
<span style="color:#898887;">// CubeScript test</span>

i = <span style="color:#b08000;">0</span>
rainbowchat = <span style="font-weight:bold;">[</span>
    out = <span style="color:#bf0303;">&quot;&quot;</span>
    <span style="color:#644a9b;">loop</span> k <span style="color:#0057ae;">$</span><span style="color:#006e28;">numargs</span> <span style="font-weight:bold;">[</span>
        word = <span style="color:#0057ae;">$</span><span style="color:#0057ae;background-color:#e0e9f8;">(</span><span style="color:#644a9b;">format</span> <span style="color:#bf0303;">&quot;arg%1&quot;</span> <span style="font-weight:bold;">(</span>+ <span style="color:#0057ae;">$k</span> <span style="color:#b08000;">1</span><span style="font-weight:bold;">)</span><span style="color:#0057ae;background-color:#e0e9f8;">)</span>
        <span style="color:#644a9b;">loop</span> j <span style="font-weight:bold;">(</span>stringlen <span style="color:#0057ae;">$word</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">[</span>
            out = <span style="font-weight:bold;">(</span><span style="color:#644a9b;">format</span> <span style="color:#bf0303;">&quot;%1</span><span style="color:#924c9d;">^fz</span><span style="color:#bf0303;">%2%3&quot;</span> <span style="color:#0057ae;">$out</span> <span style="font-weight:bold;">(</span>substring <span style="color:#bf0303;">&quot;rygcbvmr&quot;</span> <span style="color:#0057ae;">$i</span> <span style="color:#b08000;">2</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">(</span>substring <span style="color:#0057ae;">$word</span> <span style="color:#0057ae;">$j</span> <span style="color:#b08000;">1</span><span style="font-weight:bold;">))</span> 
            <span style="color:#644a9b;">if</span> <span style="font-weight:bold;">(</span>&gt; <span style="color:#0057ae;">$i</span> <span style="color:#b08000;">5</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">[</span>i = <span style="color:#b08000;">0</span> <span style="font-weight:bold;">]</span> <span style="font-weight:bold;">[</span>i = <span style="font-weight:bold;">(</span>+ <span style="color:#0057ae;">$i</span> <span style="color:#b08000;">1</span><span style="font-weight:bold;">)]</span>
        <span style="font-weight:bold;">]</span>
        out = <span style="font-weight:bold;">(</span><span style="color:#644a9b;">format</span> <span style="color:#bf0303;">&quot;%1 &quot;</span> <span style="color:#0057ae;">$out</span><span style="font-weight:bold;">)</span>
    <span style="font-weight:bold;">]</span>
    <span style="color:#644a9b;">if</span> <span style="font-weight:bold;">(</span>&lt; <span style="font-weight:bold;">(</span>stringlen <span style="color:#0057ae;">$out</span><span style="font-weight:bold;">)</span> <span style="color:#b08000;">128</span><span style="font-weight:bold;">)</span> <span style="font-weight:bold;">[</span>
        say <span style="color:#0057ae;">$out</span>
    <span style="font-weight:bold;">]</span> <span style="font-weight:bold;">[</span>
        <span style="color:#644a9b;">echo</span> <span style="font-weight:bold;">(</span><span style="color:#644a9b;">format</span> <span style="color:#bf0303;">&quot;This message is %1 chars long - the usual limit is 127. Each letter takes up 5.&quot;</span> <span style="font-weight:bold;">(</span>stringlen <span style="color:#0057ae;">$out</span><span style="font-weight:bold;">))</span>
    <span style="font-weight:bold;">]</span>
<span style="font-weight:bold;">]</span>

setcomplete rainbowchat <span style="color:#b08000;">1</span>
<span style="color:#644a9b;">listcomplete</span> rainbowchat <span style="font-weight:bold;">[</span>
    <span style="color:#bf0303;">&quot;BoOoM&quot;</span>
    <span style="color:#bf0303;">&quot;Good game!&quot;</span>
    <span style="color:#bf0303;">&quot;What the f*** was this?!?&quot;</span>
    <span style="color:#bf0303;">&quot;go for it!&quot;</span>
    <span style="color:#bf0303;">&quot;yeeeehaw!&quot;</span>
    <span style="color:#bf0303;">&quot;what a mess &gt;_&lt; &quot;</span>
<span style="font-weight:bold;">]</span>

<span style="color:#898887;">// Line continuation escape</span>
<span style="color:#bf0303;">&quot;string </span><span style="color:#924c9d;">^</span>
<span style="color:#bf0303;">    newline&quot;</span>
</pre></body></html>
